import { deleteRequest, getRequest, patchRequest, postRequest } from '@/utils/request'

export const getInfo = data => getRequest('/app/v1_0/user', data) // 获取用户自己的信息
export const login = data => postRequest('/app/v1_0/authorizations', data) // 登录
export const getProfile = data => getRequest('/app/v1_0/user/profile', data) // 获取用户信息
export const followUser = data => postRequest('/app/v1_0/user/followings', data) // 关注作者
export const updateUserInfo = data => patchRequest('/app/v1_0/user/profile', data) // 编辑用户信息
export const updateUserPhoto = data => patchRequest('/app/v1_0/user/photo', data) // 更新用户头像
export const unFollowUser = data => deleteRequest('/app/v1_0/user/followings/' + data) // 取消关注作者
